Skip to content

Remove question locking upon moderation #6615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions kitsune/questions/jinja2/questions/question_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
{% if product %}
<span class="detail">{{ pgettext('DB: products.Product.title', product.title) }}</span>
{% endif %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
{% if user and user.has_perm('questions.change_question') %}
<select id="details-product" name="product">
{% for p in all_products %}
<option {% if product and p.id == product.id %}selected="selected"{% endif %} value="{{ p.id }}" data-url="{{ url('products.product', p.slug) }}">{{ p.title }}</option>
Expand All @@ -459,7 +459,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
{% if topic %}
<span class="detail">{{ pgettext('DB: products.Topic.title', topic.title) }}</span>
{% endif %}
{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
{% if user and user.has_perm('questions.change_question') %}
<select id="details-topic" name="topic">
{% for t in all_topics %}
<option {% if topic and t.id == topic.id %}selected="selected"{% endif %} value="{{ t.id }}">{{ t.title }}</option>
Expand All @@ -469,7 +469,7 @@ <h3 class="sidebar-subheading sidebar-nav--heading-item is-accordion-heading">{{
</div>
{% endif %}

{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
{% if user and user.has_perm('questions.change_question') %}
<div class="sidebox tight condensed" id="question-locale">
<span class="title">{{ _('Locale') }}:</span>
<span class="detail">{{ settings.LANGUAGES_DICT[question.locale.lower()] }}</span>
Expand Down Expand Up @@ -528,7 +528,7 @@ <h3 class="sumo-card-heading">{{ _('Installed Plug-ins') }}</h3>
</section>
</div>

{% if not question.is_moderated and user and user.has_perm('questions.change_question') %}
{% if user and user.has_perm('questions.change_question') %}
<div class="sidebox tight">
<a href="#" id="details-edit">{{ _('Edit details') }}</a>
</div>
Expand Down
8 changes: 0 additions & 8 deletions kitsune/questions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,14 +400,6 @@ def is_solved(self):
def is_offtopic(self):
return config.OFFTOPIC_TAG_NAME in [t.name for t in self.my_tags]

@cached_property
def is_moderated(self):
return (
self.flags.filter(reason=FlaggedObject.REASON_CONTENT_MODERATION)
.exclude(status=FlaggedObject.FLAG_PENDING)
.exists()
)

@cached_property
def created_after_failed_kb_deflection(self) -> bool:
"""
Expand Down